import 'package:flutter/material.dart';
import 'package:untitled10/carouselchart_page.dart';
import 'package:untitled10/lajifenlei.dart';
import 'package:untitled10/news_comments.dart';

import 'tabbar_page.dart';

class Page0 extends StatefulWidget {
  const Page0({super.key});

  @override
  State<Page0> createState() => _Page0State();
}

class _Page0State extends State<Page0> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        elevation: 0,
        title: Text('suiwenx'),
      ),
      body: Container(
        margin: EdgeInsets.symmetric(horizontal: 20, vertical: 20),
        child: ListView(
          children: [
            Column(
              children: [
                GestureDetector(
                  onTap: () {
                    Navigator.push(context,
                        MaterialPageRoute(builder: (context) {
                      return TabBarPage();
                    }));
                  },
                  child: Container(
                    width: 400,
                    height: 50,
                    color: Colors.pink[200],
                    child: Center(child: Text('tabbar')),
                  ),
                ),
                SizedBox(
                  height: 20,
                ),
                GestureDetector(
                  onTap: () {
                    Navigator.push(context,
                        MaterialPageRoute(builder: (context) {
                      return NewsComments();
                    }));
                  },
                  child: Container(
                    width: 400,
                    height: 50,
                    color: Colors.pink[200],
                    child: Center(child: Text('News comments')),
                  ),
                ),
                SizedBox(
                  height: 20,
                ),
                GestureDetector(
                  onTap: () {
                    Navigator.push(context,
                        MaterialPageRoute(builder: (context) {
                      return CarouselChart();
                    }));
                  },
                  child: Container(
                    width: 400,
                    height: 50,
                    color: Colors.pink[200],
                    child: Center(child: Text('轮播图')),
                  ),
                )
              ],
            ),
          ],
        ),
      ),
    );
  }
}
